﻿<?xml version="1.0" encoding="utf-8"?>
<xsd:schema id="EbcDesignerDslSchema" targetNamespace="http://schemas.microsoft.com/dsltools/EbcDesignerDsl" elementFormDefault="qualified" xmlns="http://schemas.microsoft.com/dsltools/EbcDesignerDsl" xmlns:core="http://schemas.microsoft.com/VisualStudio/2008/DslTools/Core" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <xsd:import id="CoreSchema" namespace="http://schemas.microsoft.com/VisualStudio/2008/DslTools/Core" />
  <!-- Board -->
  <xsd:element name="board" type="Board" substitutionGroup="core:modelElement" />
  <xsd:complexType name="Board">
    <xsd:annotation>
      <xsd:documentation>The root in which all other elements are embedded. Appears as a diagram.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="core:ModelElement">
        <xsd:sequence minOccurs="0" maxOccurs="1">
          <!-- Relationship: BoardHasElements -->
          <xsd:element name="elements" minOccurs="0" maxOccurs="1">
            <xsd:annotation>
              <xsd:documentation>Instances of BoardHasElements</xsd:documentation>
            </xsd:annotation>
            <xsd:complexType>
              <xsd:sequence>
                <xsd:choice minOccurs="0" maxOccurs="unbounded" >
                  <xsd:element ref="boardHasElements">
                    <xsd:annotation>
                      <xsd:documentation>[Relationship deriving from BoardHasElements needs to be serialized in full-form]</xsd:documentation>
                    </xsd:annotation>
                  </xsd:element>
                  <xsd:element ref="element" >
                    <xsd:annotation>
                      <xsd:documentation>[Target role-player]</xsd:documentation>
                    </xsd:annotation>
                  </xsd:element>
                </xsd:choice>
              </xsd:sequence>
            </xsd:complexType>
          </xsd:element>
        </xsd:sequence>
        <!-- Id -->
        <xsd:attribute name="Id" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>Instance Guid of this element, needed because SerializeId is set to true.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
        <!-- dslVersion -->
        <xsd:attribute name="dslVersion" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>Version of the model serialized in this file.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
        <!-- Property: Name -->
        <xsd:attribute name="name" type="xsd:string" >
          <xsd:annotation>
            <xsd:documentation>The name of the generated class</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
        <!-- Property: Implements -->
        <xsd:attribute name="implements" type="xsd:string" >
          <xsd:annotation>
            <xsd:documentation>Interface that the generated class implements if exists</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
        <!-- Property: Usings -->
        <xsd:attribute name="usings" type="xsd:string" >
          <xsd:annotation>
            <xsd:documentation>Mostly automatically generated usings to shorten the type names</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- Board Moniker -->
  <xsd:element name="boardMoniker" type="BoardMoniker" substitutionGroup="core:modelElementMoniker" />
  <xsd:complexType name="BoardMoniker">
    <xsd:annotation>
      <xsd:documentation>Moniker for Board instance.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="core:ModelElementMoniker">
        <xsd:attribute name="Id" type="xsd:string" >
          <xsd:annotation>
            <xsd:documentation>Attribute to store the moniker string.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- Element -->
  <xsd:element name="element" abstract="true" type="Element" substitutionGroup="core:modelElement" />
  <xsd:complexType name="Element" abstract="true" >
    <xsd:annotation>
      <xsd:documentation>The base class of all elements</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="core:ModelElement">
        <xsd:sequence minOccurs="0" maxOccurs="1">
          <!-- Relationship: ElementReferencesTargetElement -->
          <xsd:element name="targetElement" minOccurs="0" maxOccurs="1">
            <xsd:annotation>
              <xsd:documentation>Instances of ElementReferencesTargetElement</xsd:documentation>
            </xsd:annotation>
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element ref="elementReferencesTargetElement" minOccurs="0" maxOccurs="unbounded">
                  <xsd:annotation>
                    <xsd:documentation>[Instance of ElementReferencesTargetElement needs to be serialized in full-form]</xsd:documentation>
                  </xsd:annotation>
                </xsd:element>
              </xsd:sequence>
            </xsd:complexType>
          </xsd:element>
        </xsd:sequence>
        <!-- Id -->
        <xsd:attribute name="Id" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>Instance Guid of this element, needed because SerializeId is set to true.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- Element Moniker -->
  <xsd:element name="elementMoniker" abstract="true" type="ElementMoniker" substitutionGroup="core:modelElementMoniker" />
  <xsd:complexType name="ElementMoniker">
    <xsd:annotation>
      <xsd:documentation>Moniker for Element instance.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="core:ModelElementMoniker">
        <xsd:attribute name="Id" type="xsd:string" >
          <xsd:annotation>
            <xsd:documentation>Attribute to store the moniker string.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- Part -->
  <xsd:element name="part" abstract="true" type="Part" substitutionGroup="element" />
  <xsd:complexType name="Part" abstract="true" >
    <xsd:annotation>
      <xsd:documentation>The base class of all parts</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="Element">
        <!-- Id -->
        <xsd:attribute name="Id" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>Instance Guid of this element, needed because SerializeId is set to true.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
        <!-- Property: Name -->
        <xsd:attribute name="name" type="xsd:string" >
          <xsd:annotation>
            <xsd:documentation>The unique display name of the part</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- Part Moniker -->
  <xsd:element name="partMoniker" abstract="true" type="PartMoniker" substitutionGroup="elementMoniker" />
  <xsd:complexType name="PartMoniker">
    <xsd:annotation>
      <xsd:documentation>Moniker for Part instance.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="ElementMoniker">
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- ExistingPart -->
  <xsd:element name="existingPart" type="ExistingPart" substitutionGroup="part" />
  <xsd:complexType name="ExistingPart">
    <xsd:annotation>
      <xsd:documentation>An existing component identified by a .Net type</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="Part">
        <!-- Id -->
        <xsd:attribute name="Id" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>Instance Guid of this element, needed because SerializeId is set to true.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
        <!-- Property: ClrTypeString -->
        <xsd:attribute name="clrTypeString" type="xsd:string" />
        <!-- Property: CSharpTypeString -->
        <xsd:attribute name="cSharpTypeString" type="xsd:string" />
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- ExistingPart Moniker -->
  <xsd:element name="existingPartMoniker" type="ExistingPartMoniker" substitutionGroup="partMoniker" />
  <xsd:complexType name="ExistingPartMoniker">
    <xsd:annotation>
      <xsd:documentation>Moniker for ExistingPart instance.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="PartMoniker">
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- PartContract -->
  <xsd:element name="partContract" type="PartContract" substitutionGroup="part" />
  <xsd:complexType name="PartContract">
    <xsd:annotation>
      <xsd:documentation>An empty part definition telling the compiler to generate an interface</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="Part">
        <!-- Id -->
        <xsd:attribute name="Id" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>Instance Guid of this element, needed because SerializeId is set to true.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- PartContract Moniker -->
  <xsd:element name="partContractMoniker" type="PartContractMoniker" substitutionGroup="partMoniker" />
  <xsd:complexType name="PartContractMoniker">
    <xsd:annotation>
      <xsd:documentation>Moniker for PartContract instance.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="PartMoniker">
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- StartEvent -->
  <xsd:element name="startEvent" type="StartEvent" substitutionGroup="element" />
  <xsd:complexType name="StartEvent">
    <xsd:annotation>
      <xsd:documentation>Creates a method on the board that can be used as input by other boards</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="Element">
        <!-- Id -->
        <xsd:attribute name="Id" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>Instance Guid of this element, needed because SerializeId is set to true.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- StartEvent Moniker -->
  <xsd:element name="startEventMoniker" type="StartEventMoniker" substitutionGroup="elementMoniker" />
  <xsd:complexType name="StartEventMoniker">
    <xsd:annotation>
      <xsd:documentation>Moniker for StartEvent instance.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="ElementMoniker">
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- StopEvent -->
  <xsd:element name="stopEvent" type="StopEvent" substitutionGroup="element" />
  <xsd:complexType name="StopEvent">
    <xsd:annotation>
      <xsd:documentation>Creates an event on the board that can be used as output by other boards</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="Element">
        <!-- Id -->
        <xsd:attribute name="Id" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>Instance Guid of this element, needed because SerializeId is set to true.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- StopEvent Moniker -->
  <xsd:element name="stopEventMoniker" type="StopEventMoniker" substitutionGroup="elementMoniker" />
  <xsd:complexType name="StopEventMoniker">
    <xsd:annotation>
      <xsd:documentation>Moniker for StopEvent instance.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="ElementMoniker">
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- BoardHasElements -->
  <xsd:element name="boardHasElements" abstract="true" type="BoardHasElements" substitutionGroup="core:modelElement" />
  <xsd:complexType name="BoardHasElements" abstract="true" >
    <xsd:annotation>
      <xsd:documentation>Embedding relationship between the Model and Elements</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="core:ModelElement">
        <xsd:sequence minOccurs="0" maxOccurs="1">
          <!-- Target end Element -->
          <xsd:element ref="element" minOccurs="1" maxOccurs="1">
            <xsd:annotation>
              <xsd:documentation>[Target role-player]</xsd:documentation>
            </xsd:annotation>
          </xsd:element>
        </xsd:sequence>
        <!-- Id -->
        <xsd:attribute name="Id" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>Instance Guid of this element, needed because SerializeId is set to true.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- BoardHasElements Moniker -->
  <xsd:element name="boardHasElementsMoniker" type="BoardHasElementsMoniker" substitutionGroup="core:modelElementMoniker" />
  <xsd:complexType name="BoardHasElementsMoniker">
    <xsd:annotation>
      <xsd:documentation>Moniker for BoardHasElements instance.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="core:ModelElementMoniker">
        <xsd:attribute name="Id" type="xsd:string" >
          <xsd:annotation>
            <xsd:documentation>Attribute to store the moniker string.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- ElementReferencesTargetElement -->
  <xsd:element name="elementReferencesTargetElement" type="ElementReferencesTargetElement" substitutionGroup="core:modelElement" />
  <xsd:complexType name="ElementReferencesTargetElement">
    <xsd:annotation>
      <xsd:documentation>Defines an ebc connection (wire) between an event and a method</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="core:ModelElement">
        <xsd:sequence minOccurs="0" maxOccurs="1">
          <!-- Target end Element -->
          <xsd:element ref="elementMoniker" minOccurs="1" maxOccurs="1">
            <xsd:annotation>
              <xsd:documentation>[Target role-player]</xsd:documentation>
            </xsd:annotation>
          </xsd:element>
        </xsd:sequence>
        <!-- Id -->
        <xsd:attribute name="Id" type="xsd:string">
          <xsd:annotation>
            <xsd:documentation>Instance Guid of this element, needed because SerializeId is set to true.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
        <!-- Property: Output -->
        <xsd:attribute name="output" type="xsd:string" >
          <xsd:annotation>
            <xsd:documentation>The name of the event that fires into the connection</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
        <!-- Property: Input -->
        <xsd:attribute name="input" type="xsd:string" >
          <xsd:annotation>
            <xsd:documentation>The name of the method called by the connection</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
        <!-- Property: ClrTypeString -->
        <xsd:attribute name="clrTypeString" type="xsd:string" />
        <!-- Property: CSharpTypeString -->
        <xsd:attribute name="cSharpTypeString" type="xsd:string" />
        <!-- Property: Type -->
        <xsd:attribute name="type" type="xsd:string" >
          <xsd:annotation>
            <xsd:documentation>The data-type of the connection</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
        <!-- Property: InputString -->
        <xsd:attribute name="inputString" type="xsd:string" />
        <!-- Property: OutputString -->
        <xsd:attribute name="outputString" type="xsd:string" />
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
  <!-- ElementReferencesTargetElement Moniker -->
  <xsd:element name="elementReferencesTargetElementMoniker" type="ElementReferencesTargetElementMoniker" substitutionGroup="core:modelElementMoniker" />
  <xsd:complexType name="ElementReferencesTargetElementMoniker">
    <xsd:annotation>
      <xsd:documentation>Moniker for ElementReferencesTargetElement instance.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="core:ModelElementMoniker">
        <xsd:attribute name="Id" type="xsd:string" >
          <xsd:annotation>
            <xsd:documentation>Attribute to store the moniker string.</xsd:documentation>
          </xsd:annotation>
        </xsd:attribute>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  
</xsd:schema>

